package com.ruoyi.business.service;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.bizsys.domain.CreditAccount;
import com.ruoyi.bizsys.domain.LoanIou;
import com.ruoyi.bizsys.domain.RepaymentOrder;

import java.math.BigDecimal;

/**
 * @author wqg
 * @description
 * @date 2022/6/15
 */
public interface IDoRepaymentLastService {
    void lastInitRuleInAndAutoMat(RepaymentOrder repaymentOrder);

    /**
     * 会冻结钱包，记得失败解冻过钱包
     * @param minPay
     * @param custNo
     * @param loanSerialNo
     * @param isDeffer
     * @return
     */
    JSONObject getAmtWallet(BigDecimal minPay, String custNo, String loanSerialNo, boolean isDeffer);

    void updateWalletOrderToSuccess(RepaymentOrder repaymentOrder, boolean isDeffer);

    void updateWalletOrderToFailed(String orderSerialNo, boolean isDeffer);

    /**
     * 获取钱包可用金额
     * @return
     */
    BigDecimal getWalletAmount(String custNo);

}
